<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>47.es9正则之反向断言</title>
</head>
<body>

<script>
  let  str = 'saas1234爱你456啦'
  //正向断言，对后面进行限制
  let reg1 = /\d+(?=啦)/
  let result = reg1.exec(str)
  console.log(result)


  //反向断言，对前面进行限制
  let reg2 = /(?<=你)\d+/
  let result2 = reg2.exec(str);
  console.log(result2)
</script>
</body>
</html>